package com.labtalk.admin.pojo.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author G-pointy
 * @Date 2022-08-09
 * @Description: 响应数据通用实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseVo {

    @ApiModelProperty(value = "响应码")
    private int status;

    @ApiModelProperty(value = "响应信息")
    private String desc;

    @ApiModelProperty(value = "响应数据")
    private Object data;

    public static ResponseVo success(int status, String desc, Object object) {
        return new ResponseVo(status, desc, object);
    }

    public static ResponseVo error(int status, String desc, Object object) {
        return new ResponseVo(status, desc, object);
    }
}
